package sysUser;

import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface SysUserMapper<SysUser> {
    /**
     * 统计用户数量
     * @return
     */
    public int count();

    public List<SysUser> getUserList();

    public List<SysUser> getUsersByRealName(String realName);

    public List<SysUser> getUserListByPojo(SysUser SysUser);

    public List<SysUser> getUserListByMap(Map<String, Object> userMap);

    public List<SysUser> getUserListParams(@Param("realName") String realName, @Param("roleId") String roleId);

    public List<SysUser> getUserListWithRoleName(SysUser sysUser);

    public List<SysUser> getUserListByRoleId(@Param("roleId") Integer roleId);

    public List<SysUser> getUserAndAddressesByUserId(@Param("userId") Integer userId);

    public int add(SysUser sysUser);

    public int modify(SysUser sysUser);

    public int updatePwd(@Param("id") Integer id, @Param("password") String pwd);

    public int deleteUserById(@Param("id") Integer id);

    public List<SysUser> selectList(@Param("realName") String realName, @Param("roleId") Integer roleId);

    List<SysUser> selectList(String realName, Integer roleId, String account, Date createdTime);

    public List<SysUser> getUserByRoleIdArray(Integer[] roleIds);

}
